package com.itheima.da_te_be;

import com.itheima.bean.Student;
import org.apache.ibatis.io.Resources;
import org.apache.ibatis.session.SqlSession;
import org.apache.ibatis.session.SqlSessionFactory;
import org.apache.ibatis.session.SqlSessionFactoryBuilder;
import org.junit.Test;
import org.junit.internal.Classes;

import java.io.InputStream;
import java.util.List;

public class Test01 {
    @Test
    public void selectAll() throws Exception {
        InputStream resourceAsStream = Resources.getResourceAsStream("myBatisStudent.xml");
        SqlSessionFactory build = new SqlSessionFactoryBuilder().build(resourceAsStream);
        SqlSession sqlSession = build.openSession(true);
        ClassMopper mapper = sqlSession.getMapper(ClassMopper.class);
        List<Classes> list = mapper.slsectAll();

        for (Classes classes : list){

        }




    }

}
